import cv2


def number_of_frame(path):
    cap = cv2.VideoCapture(path)
    number = cap.get(7)
    cap.release()
    return number


if __name__ == "__main__":
    number = number_of_frame(
        r"D:\dataset\YawDDdataset\Mirror\Female_mirror_face_generation\15-FemaleNoGlasses-Normal.avi")
    print(number)